Detect runtime-added files in external extension watch paths#7493
Draft
isaacroldan wants to merge 1 commit intoremove-file-watcher-dead-codefrom
Draft
Detect runtime-added files in external extension watch paths#7493isaacroldan wants to merge 1 commit intoremove-file-watcher-dead-codefrom
isaacroldan wants to merge 1 commit intoremove-file-watcher-dead-codefrom
Conversation
This was referenced May 7, 2026
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
6f9fc37 to
8e6d25a
Compare
a80b152 to
423fc0b
Compare
Extensions can declare watch globs outside their own directory via devSessionWatchConfig.paths (e.g. an admin extension's static_root, or a function pointing at a shared sources tree). Today, files added there at runtime aren't picked up: chokidar only watches the specific files returned by globSync at start, not their parent directories. This change: - Computes the static prefix of every external watch glob (the longest leading path with no wildcards) and adds those prefixes to chokidar's watch list, deduped against the extension directories chokidar already watches recursively. - Loosens discoverFileOwners to attribute paths by watch-pattern match rather than directory containment alone. Outside-dir paths are only attributed to extensions that explicitly opt in via devSessionWatchConfig, so the default '**/*' pattern doesn't pollute attribution for config-style extensions whose directory is the app root. - Updates pathMatchesWatchPatterns to match against both the absolute path and the path relative to the extension directory, since devSessionWatchConfig patterns can be either form.
8e6d25a to
c17d3cd
Compare
423fc0b to
054b1fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

WHY are these changes introduced?
Fixes #0000
WHAT is this pull request doing?
How to test your changes?
Post-release steps
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add